<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="./style.css" rel="stylesheet">
<title>FOOD UPDATE</title>
</head>
<body style="text-align: center">
	<div class="div-body">
		<div class="nav-title-bar">
			<span>AMC - Merchant System</span>
		</div>

		<div class="content-menu">
			<ul class="content-menu-ul">
			</ul>
		</div>

		<div class="content-content" style="width: auto; text-align: center;">
			<form action="UpdateFoodsServlet" method="POST"
				enctype="multipart/form-data" style="width: 450px;">
				<table align="center">
					<tbody>
						<tr>
							<td>foodName:</td>
							<td><input type="text" name="foodName"
								value="${food.getFoodName()}" /></td>
						</tr>
						<tr>
							<td>foodPrice:</td>
							<td><input type="text" name="foodPrice"
								value="${food.getFoodPrice()}" /></td>
						</tr>
						<tr>
							<td>foodPic:</td>
							<td><img src="${food.getFoodPic()}"
								style="width: 60px; height: 60px;" /></td>
						</tr>
						<tr>
							<td>newFoodPic:</td>
							<td style="width: 133px;"><input style="width: 80%;"
								type="file" name="newFoodPic" /></td>
						</tr>
						<tr>
							<td>foodFoodType:</td>
							<td><select name="foodFoodType" style="width: 83%;">
									<c:forEach items="${foodTypesList}" var="foodType">
										<option value="${foodType.getTypeId()}"
											<c:if test="${foodType.getTypeId()==food.getFoodFoodTypeId()}">selected="selected"</c:if>>
											${foodType.getTypeName()}</option>
									</c:forEach>
							</select></td>
						</tr>

					</tbody>
				</table>
				<input type="hidden" name="foodId" value="${food.getFoodId()}" /> <input
					type="hidden" name="merchantId" value="${food.getMerchantId()}" />
				<input type="hidden" name="foodPic" value="${food.getFoodPic()}" />
				<input class="add-button" type="submit" value="UPDATE" /> <b>${message}</b>
			</form>
		</div>
	</div>
</body>
</html>